{include file="common/header.tpl"}    
    <div id="vfriendContainer">
        <div id="mainContent3C">
            <div class="vfriendContainer3C">
                <div class="vfriendContent3C">
                	<div class="leftCol">  
                    	{include file="place/box-navigation.tpl"}               	
                    </div>
                    <div class="rightCol">
                        <div class="midCol">
                        	<div class="boxEdit">
                            	<div class="headerTitle"><h3>Chỉnh sửa địa điểm</h3></div>
                                <div class="editItem">
                                	<form name="frmEdit" id="frmEdit" method="post" action="{$smarty.const.HOST_VFRIEND}place/saveedit" enctype="multipart/form-data">
										<input type="hidden" name="puserid" id="puserid" value="{$row.userid|base64E}" />
										<input type="hidden" name="pplaceid" id="pnewsid" value="{$row.placeid}" />
										<input type="hidden" name="prefer" id="prefer" value="{if isset($smarty.session.sPlaceEdit.prefer)}{$smarty.session.sPlaceEdit.prefer|escape}{else}{$refer}{/if}" />										
										{if isset($smarty.session.sPlaceError)}
                                            <div class="userInput">
                                                <span class="errorMessage">{$smarty.session.sPlaceError}</span>
                                            </div>
										{/if}                                    	
                                        <div class="userInput">
                                            <label for="psubcategoryid">Loại <span class="symbolRequire">*</span>:</label>
                                            <div class="category">
                                                <select id="psubcategoryid" class="select" name="psubcategoryid">
                                                    <option value="0">Chọn</option>
                                                    {if $arrMenu}												
                                                    {foreach item=menu from=$arrMenu}
                                                        {foreach item=sub from=$menu.sub}
                                                            <option value="{$sub.categoryid}" {if ($sub.categoryid == $row.subcategoryid)} selected="selected" {/if}>{$sub.name}</option>
                                                        {/foreach}
                                                    {/foreach}
                                                    {/if}
                                                    
                                                </select>
                                        	</div>
                                        </div>
                                        <div class="userInput">
                                            <label for="pname">Tên địa điểm <span class="symbolRequire">*</span>:</label>
                                            <input type="text" name="pname" id="pname" value="{$row.name}" maxlength="255" class="text" />
                                        </div>
                                        <div class="userInput">
                                            <label for="pprovince">Tỉnh/thành <span class="symbolRequire">*</span>:</label>
                                            <div class="province">
                                                <select id="pprovince" class="select" name="pprovince" onchange="javascript:loadDistrict(this.value, 'pdistrict')">
                                                    <option value="0">Chọn</option>
                                                    {html_options options=$arrProvince selected=$row.province}
                                                </select>
                                           	</div>
                                        </div>
                                        <div class="userInput">
                                            <label for="pdistrict">Quận/huyện <span class="symbolRequire">*</span>:</label>
                                            <div class="district">
                                                <select id="pdistrict" class="select" name="pdistrict">
                                                    <option value="0">Chọn</option>
                                                    {html_options options=$arrDistrict selected=$row.district}
                                                </select>
                                           	</div>
                                        </div>
                                        <div class="userInput">
                                            <label for="paddr">Địa chỉ <span class="symbolRequire">*</span>:</label>
                                            <input type="text" name="paddress" id="paddress" class="text" value="{$row.addr}"/>
                                        </div>
                                        <div class="userInput">
                                            <label for="pimage">Hình minh họa <span class="symbolRequire">*</span>:</label>
                                            <input type="file" name="pimage" id="pimage" value="" class="file" />
                                            <a href="javascript:;" id="aimage" class="tipsy" title="Định dạng cho phép: .PNG .PJG .GIF .PJEG<br/><br/>Dung lượng tối đa của hình minh họa là {$smarty.const.IMAGE_SIZE}mb."><img src="{$smarty.const.HOST_STATICS}img/icon/tips.png" alt="{$smarty.const.DOMAIN}: Hướng dẫn đăng hình minh họa cho tin tức." border="0" width="13" /></a>
                                        </div>
                                        {if $row.image neq ""} 
                                            <div class="userInput">
                                                <div class="image">
                                                    {image path=$row.image type=7}
                                                </div>                                        
                                            </div>                                          
                                        {/if}   
                                        {*                                     
                                        <div class="userInput">
                                            <label for="pcontent">Giới thiệu <span class="symbolRequire">*</span>:</label>
                                           	{"pcontent"|fck:$row.content:"Blog":"399":"300px"}
                                        </div>
                                        <div class="userInput">
                                        	<label for="pmap">Map đường dẫn <span class="symbolRequire">*</span>:</label>
                                            <textarea rows="0" cols="0" id="pmap" name="pmap">{$row.map|replace:"\\":""}</textarea>
                                        </div>
                                        *}
                                        <div class="userInput">
                                        	<input type="submit" value="Lưu" class="btnSubmit" />
                                            <input type="button" value="Nhập lại" class="btnReset" onclick="document.location.href='{if isset($smarty.session.sPlaceEdit.prefer)}{$smarty.session.sPlaceEdit.prefer|escape}{else}{$refer}{/if}'" />
                                        </div>
                                	</form>
                                </div>
                            </div>
                    	</div>                        
                   	</div>
               	</div>
            </div>
        </div>
    </div>
{include file="common/footer.tpl"}
